package cn.calm.cxf.frist.client;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

import cn.calm.cxf.frist.api.IHelloWorldService;

public class HelloWorldServiceClient {
	 public static void main(String[] args) {
		 //调用WebService
	        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
	        factory.setServiceClass(IHelloWorldService.class);
	        factory.setAddress("http://localhost:9000/helloWorld");
	        
	        IHelloWorldService service = (IHelloWorldService) factory.create();
	        System.out.println("[result]" + service.sayHello("hoojo"));
	    }
}
